<%@ page import="com.oriental.reserve.enums.BankReportStatus" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags/form" %>
<%--
  User: Yangxp
  Date: 2016/5/19
  Time: 9:31
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/views/reserve/report/reserveBankReport.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">

<core:import url="../../common/pageHead.jsp">
    <core:param name="title" value="查询备付金银行上传信息"/>
</core:import>

<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/reserve/bank/report/search" class="form-inline" autocomplete="off">
        <table table-detail>
            <tr>
                <td class="text-right">
                    备付金账号：
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.accountNo" class="{{vm.constant.inputClass}}"
                           typeahead-min-length="0"
                           uib-typeahead="item.accountNo as item.bankCode for item in vm.cached.RESERVE_LIST | filter:$viewValue | limitTo:10"/>
                </td>
                <td class="text-right">
                    报表时间：
                </td>
                <td nowrap="nowrap" style="white-space:nowrap;overflow:hidden;word-break:keep-all;">
                    <input type="text" class="form-control" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.queryBean.queryStartDate"
                           required/>
                    ——
                    <input type="text" class="form-control" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.queryBean.queryEndDate"
                           required/>

                </td>
            </tr>
            <tr>
                <td colspan="8" class="textCenter">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">查询</button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <p class="btn-group">
            <%--<shiro:hasPermission name="reserve-transType_add">--%>
                <button ng-click="vm.addItem()"><i class="glyphicon glyphicon-plus"></i></button>
            <%--</shiro:hasPermission>--%>
        </p>
        <table table-detail>
            <thead>
            <tr>
                <th>
                    <input type="checkbox" ng-model="_checkedAll" checkbox-all="vm.pagination.list">
                </th>
                <th>账号</th>
                <th>报表日期</th>
                <th>上报状态</th>
                <th>响应信息</th>
                <th>勾稽结果</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-repeat="bean in vm.pagination.list track by $index">
            <tr>
                <td>
                    <input name="check" type="checkbox" ng-model="bean._checked">
                </td>
                <td>{{vm.cached.BANK_INFO[bean.accountNo]['remarkDesc']}}[{{bean.accountNo}}]</td>
                <td>{{bean.businessDate|date:'yyyy-MM-dd'}}</td>
                <td>{{{
                    <%for (BankReportStatus e : BankReportStatus.values()) {%>
                    '<%=e.getCode()%>':'<%=e.getDesc()%>',
                    <%}%>
                    }[bean.status]}}[{{bean.status}}]</td>
                <td>{{bean.desc}}</td>
                <td>{{bean.checkResult}}</td>
                <td>
                    <button ng-click="vm.pullCheckResult(bean)" ng-if="bean.status==<%=BankReportStatus.UPLOAD_SUCCESS.getCode()%> || bean.status==<%=BankReportStatus.CHECK_FAIL.getCode()%>">查看勾稽结果</button>
                    <button ng-click="vm.downloadFile(bean)">下载报文</button>
                    <button ng-click="vm.auditReport(bean)" ng-if="bean.status==<%=BankReportStatus.INIT.getCode()%> || bean.status==<%=BankReportStatus.UPLOAD_FAIL.getCode()%> ">审核通过</button>
                </td>
            </tr>
            </tbody>

            <tfoot>
            <tr>


            </tr>
            </tfoot>
        </table>
    </div>

    <core:import url="../../common/pageFoot.jsp"/>
</div>
<core:import url="../../common/nav.jsp"/>
</body>
</html>
